<template>
    <div>
        <h3>ajax Post</h3>
        <div>
            <button @click="ajaxGet">测试Ajax Get</button>
        </div>
    </div>
</template>
<script>
    import {API} from '@/http/api';
    export default {
        components: {

        },
        props: {

        },
        data () {
            return {
                ajaxRet: {
                    userName: "",
                    userId: "",
                    password: ""
                },
                userList: []
            }
        },
        mounted(){

        },
        /**
         * 计算属性
         */
        computed: {

        },
        methods: {
            ajaxGet() {
                API.mockGet({}).then((response) => {
                    console.log(response);
                    window.alert(JSON.stringify(response));
                }).catch((error) => {
                    console.log(error);
                });
            }
        }
    }
</script>
<style scoped>

</style>